export const imgLazyload = function (scrollTop) {
    const imgs = document.getElementsByTagName('img')
    const num = imgs.length
    const clientHeight = document.documentElement.clientHeight
    let n = 0
    for (let i = n; i < num; i++) {
        const img = imgs[i]
        if (img.offsetTop <= scrollTop + clientHeight) {
            if (img.getAttribute('src') === 'defaultSrc') {
                img.src = img.getAttribute('data-src')
                n++
            }
        }
    }
}